<%@page import="model.bean.Calendar"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String uName = (String) request.getSession().getAttribute("uName");
	String role = (String) request.getSession().getAttribute("role");	
	if((uName == null) || !("admin".equals(role) || !"user".endsWith(role))) {
		response.sendRedirect("login.jsp");
	}
%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<title>Mock Project</title>
<meta
	content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'
	name='viewport'>
<%@ include file="jsheader.jsp"%>
</head>
<body class="skin-blue">

	<%
		String them = (String)request.getAttribute("them");
	%>
	<!-- header logo: style can be found in header.less -->
	<%@ include file="header.jsp"%>

	<div class="wrapper row-offcanvas row-offcanvas-left">
		<!-- Left side column. contains the logo and sidebar -->
		<%@ include file="menu.jsp"%>

		<!-- Right side column. Contains the navbar and content of the page -->
		<aside class="right-side"> <!-- Content Header (Page header) -->
		<section class="content-header">
		<h1>Quản lý phòng ban</h1>
		<ol class="breadcrumb">
			<li><a href="#"><i class="fa fa-dashboard"></i> Trang chủ</a></li>
			<li><a href="#">Quản lý phòng ban</a></li>
			<li class="active">Thêm mới</li>
		</ol>
		</section> <!-- Main content --> <section class="content">
		<div class="col-md-8">
			<%
				if ("true".equals(them)) {
			%>
			<div class="alert alert-success alert-dismissable">
			<i class="fa fa-info"></i>
				<button type="button" class="close" data-dismiss="alert"
					aria-hidden="true">×</button>
				<b>Thông báo: </b> Thêm mới thành công.
			</div>
			<%
				}
				if ("false".equals(them)) {
			%>
			<div class="alert alert-danger alert-dismissable">
				<i class="fa fa-info"></i>
				<button type="button" class="close" data-dismiss="alert"
					aria-hidden="true">×</button>
				<b>Lỗi kết nối :</b> Thêm mới thất bại !
			</div>
			<%
				}
			%>
		</div>
		<div class="row">
			<!-- left column -->
			<div class="col-md-8">
				<!-- general form elements -->
				<div class="box box-primary">
					<!-- /.box-header -->
					<!-- form start -->
					<form action="DonviServlet" method="post">
						<div class="box-body">
							<div class="form-group">
								<label>Tên cơ quan:</label> <input class="form-control"
									type="text" placeholder="Nhập vào tên cơ quan" name="tencq" required="true"> 
									<label>Địa chỉ:</label> <input
									class="form-control" type="text" placeholder="Nhập vào địa chỉ"
									name="diachi" required="true"> <label>Điện thoại :</label> <input
									class="form-control" type="number"
									placeholder="Nhập vào SĐT" name="dienthoai" required="true">
								<label>Email:</label> <input class="form-control" type="email"
									placeholder="Nhập vào email" name="email" required="true" >
								<!-- /.form group -->							
							</div>
							<div class="box-footer">
								<button type="submit" class="btn btn-success" name="them">Thêm
									mới</button>
								<a href="DonviServlet?boqua"
										class="btn btn-primary">Bỏ qua</a>
							</div>
						</div>
					</form>
				</div>
				<!-- /.box -->
			</div>
			<!--/.col (left) -->
		</div>
		<!-- /.row --> </section><!-- /.content --> </aside>
		<!-- /.right-side -->
	</div>
	<!-- ./wrapper -->
	<!-- jQuery 2.0.2 -->
	<script src="js/jquery.min.js"></script>
	<!-- Bootstrap -->
	<script src="js/bootstrap.min.js" type="text/javascript"></script>
	<!-- InputMask -->
	<script src="js/plugins/input-mask/jquery.inputmask.js"
		type="text/javascript"></script>
	<script src="js/plugins/input-mask/jquery.inputmask.date.extensions.js"
		type="text/javascript"></script>
	<script src="js/plugins/input-mask/jquery.inputmask.extensions.js"
		type="text/javascript"></script>
	<!-- AdminLTE App -->
	<script src="js/AdminLTE/app.js" type="text/javascript"></script>
	<!-- AdminLTE for demo purposes -->
	<script src="js/AdminLTE/demo.js" type="text/javascript"></script>
	<!-- Page script -->
</body>
</html>